<template>
  <div>
    <span>姓名：{{ userName }}</span>
    <br>
    <span>班级：{{ userClass }}</span>
  </div>
</template>

<script>
export default {
  name: "TestA",
  computed: {
    userName() {
      return this.$store.getters.userName;
    },
    userClass() {
      return this.$store.getters.userClass;
    }
  }
};
</script>